package com.boss.controller;

import com.boss.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.ExecutionException;

/**
 * Created by xuxiaobao on 2017/8/22.
 */
@RestController
public class ConsumerController {
    @Autowired
    private ConsumerService consumerService;
    @RequestMapping(value = "/ribbon-consumer", method = RequestMethod.GET)
    public String helloConsumer() throws ExecutionException, InterruptedException {
        return consumerService.helloService().get();
    }

}
